<template>
  <div>
    <iframe class="typhoon" :src="url_list[urlIndex]"></iframe>

    <div class="link-bottom-group">
      <router-link v-for="(item, index) in menusList" :to="item.path" :key="index"
        ><span>{{ item.title }}</span>
      </router-link>
    </div>
  </div>
</template>
<script>
import axios from "axios";
import { getTyhoonList, getTyphoonInfo } from "@/api/typhoonApi";
/**
 * 嵌入免费台风路径
 */
export default {
  data() {
     var menusList = [{"title":"首页","path":"/"}];
    var url_list = ["https://tf.istrongcloud.com/release/index-fj.html"];
    return {
      menusList,
      url_list,
      urlIndex: 0,
      typhoonList: [],
      typhoonList2: [],
    };
  },
  created() {
    this.getTy();

    // axios.get("https://typhoon.slt.zj.gov.cn/Api/TyphoonList/2023").then((res)=>{this.typhoonList=res.data});
    // axios.get("https://tf.istrongcloud.com/data/completion/202314.json?rand=15470633");
  },

  methods: {
    async getTy() {
      var res = await getTyhoonList();
      this.typhoonList = res;
      for (let item of this.typhoonList) {
        let res2 = await getTyphoonInfo(item.tfid);
        this.typhoonList2.push(res2);
      }
    },
  },
};
</script>
<style scoped>
.typhoon {
  width: 100%;
  height: calc(100vh - 50px);
}
</style>
